package edu.tgc.service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import org.abyss.common.service.CommonCrudService;
import org.springframework.stereotype.Service;

import edu.tgc.entity.TbNation;
@Service
public class NationService extends CommonCrudService<TbNation, Integer>{

	public List<HashMap<String, Object>> combo() {
		List<HashMap<String, Object>> result=new ArrayList<>();
		List<TbNation> list = baseRepository.findAll();
		for (TbNation nation : list) {
			HashMap<String, Object> node=new HashMap<>();
			node.put("id", nation.getId());
			node.put("text", nation.getName());
			result.add(node);
		}
		return result;
	}

}
